package com.whfc.emp.dao;

import com.whfc.emp.entity.WorkDailyReport;
import com.whfc.entity.dto.Apply.rep.DailyReportDisplayRep;
import com.whfc.entity.dto.Apply.rep.WorkDailyReportDTO;
import com.whfc.entity.dto.Apply.req.AppEntryApplicationReq;
import com.whfc.entity.dto.Apply.req.WorkDailyReportQueryReq;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 工作日报Mapper，定义数据库操作方法
 */
public interface WorkDailyReportMapper {
    // 基础CRUD
    int insert(WorkDailyReport record);
    int insertSelective(WorkDailyReport record);
    WorkDailyReport selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(WorkDailyReport record);
    int updateByPrimaryKey(WorkDailyReport record);
    int deleteByPrimaryKey(Long id);

    // 业务查询：按计划ID查询日报
    List<WorkDailyReport> selectByPlanId(@Param("planId") Long planId);
    // 业务查询：按汇报人ID查询日报
    List<WorkDailyReport> selectByReporter(@Param("reporter") Long reporter);

    List<DailyReportDisplayRep> queryHarvestReport(WorkDailyReportQueryReq req);

    List<DailyReportDisplayRep> queryMyDailyReport(WorkDailyReportQueryReq req);

    List<WorkDailyReportDTO> selectReportList(AppEntryApplicationReq req);
}